﻿using UnityEngine;
using System.Collections;

public class BulletMove2 : MonoBehaviour {
	
	public float bulletSpeed = 10f;
	public float direction1;
	public GameObject myPlayer2;
	
	void Start(){
		myPlayer2 = GameObject.FindWithTag("Player2");
		direction1 = myPlayer2.GetComponent<Player2Controller>().playerScale2.x;
	}
	
	void FixedUpdate () {
		rigidbody2D.velocity = new Vector2(bulletSpeed*direction1, rigidbody2D.velocity.y);
	}
	
}
